app.service("brandService", function ($http) {
    this.findAll = function () {
        return  $http.get('../brand/findAll');
    };

    this.findPage = function (page,rows) {                                      // 分页查询
        return $http.get("../brand/findByPage/" + page + "/" + rows);
    };

    this.add  = function (entity) {                                             // 添加
        return $http.post("../brand/add", entity);
    };

    this.update = function (entity) {                                           // 更新
        return  $http.post("../brand/update", entity);
    };

    this.findOne = function (id) {                                              // 根据id查询
        return  $http.get("../brand/findOne/" + id);
    };

    this.del = function (ids) {                                                 // 删除
        return  $http.get("../brand/delete?ids="+ids);
    };

    //	查询品牌下拉列表
    this.findBrandList = function () {
        return $http.get('../brand/findBrandList');
    };

});